<template>
  <div class="app">
    <header class="header">
      <div class="container">
        <router-link to="/" class="logo">Pinia 教程</router-link>
        <nav class="nav">
          <router-link to="/" class="nav-link">首页</router-link>
          <router-link to="/intro" class="nav-link">教程指南</router-link>
          <a href="https://pinia.vuejs.org/" target="_blank" class="nav-link">官方文档</a>
        </nav>
      </div>
    </header>
    
    <main class="main">
      <router-view />
    </main>
    
    <footer class="footer">
      <div class="container">
        <p>Copyright © {{ new Date().getFullYear() }} Pinia 教程</p>
      </div>
    </footer>
  </div>
</template>

<style>
@import './assets/markdown.css';

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #2c3e50;
  background-color: #f8f9fa;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background-color: #42b883;
  padding: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-link:hover, 
.nav-link.router-link-active {
  background-color: rgba(255, 255, 255, 0.2);
}

.main {
  flex: 1;
  padding: 30px 0;
}

.footer {
  background-color: #2c3e50;
  color: white;
  padding: 20px 0;
  text-align: center;
}
</style> 